package com.dynamicthreadpool.strategy;

import java.util.concurrent.ThreadPoolExecutor;

/**
 * DiscardPolicy拒绝策略实现
 * 静默丢弃无法处理的任务，不抛出异常也不执行
 */
public class DiscardPolicy implements RejectStrategy {

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        // 静默丢弃，什么都不做
    }

    @Override
    public String getPolicyName() {
        return "discard";
    }
}
